import requests

resp = requests.get("https://redis.io/commands/")
from bs4 import BeautifulSoup

soup = BeautifulSoup(resp.text)
aels = filter(lambda it: "/commands/" in it.attrs["href"],soup.select("a"))
aels = list(map(lambda it: it.attrs["href"].strip("/").replace("commands/", "").replace("-", " "), aels))
aels
soup.select("p.opacity-70")
from collections import OrderedDict

cmd2desc = OrderedDict()
for article in soup.select("article"):
    cmd = article.select_one("h1")
    desc = article.select_one("p")
    if cmd and desc:

        cmd2desc[cmd.text.strip()] = desc.text.strip()
import json
json.dumps(cmd2desc)